package com.asset.dao;

import com.asset.pojo.Asset;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Component
public interface AssetMapper {
	public void insert(Asset asset);
	public List<Asset> listAll();
	public int updateByPrivateKey(Asset asset);
	public int updateByKey(Asset asset);
	public int delectByPrivateKey(long id);
	public Asset getAssetByUsercode(String code);
	public Asset getAssetByIdentifer(String identifier);
	public Asset getAssetByItCode(String itCode);
	public Asset getAssetByPrivateKey(long id);
	public List<Asset> listAsset(@Param("tempId") Long id, @Param("tempName") String tempName);
	public int exitIfPd(int ifPd);
	//ifPd 为1时查询已经被盘点的， 其他情况查询未被盘点的
	public List<Asset> listAssetAllPage(@Param("tempName") String tempName, @Param("recordStart") Integer recordStart, @Param("recordEnd") Integer recordEnd, 
			@Param("ifPd") Short ifPd, @Param("equipGenre") Short equipGenre, @Param("status") Short status,
			@Param("buyTime1")Date buyTime1,@Param("buyTime2")Date buyTime2,@Param("useTime1")Date useTime1,@Param("useTime2")Date useTime2);
}
